import serial
import time
import json
# Set up the serial connection (adjust parameters as needed)
ser = serial.Serial('/dev/ttyUSB0', 115200, timeout=1)

# Read from the serial port
while True:
    if ser.in_waiting > 0:
        line = ser.readline().decode('utf-8').rstrip()
        print(line)
    time.sleep(0.1)
